import React from 'react';
import './index.scss';
import { connect } from 'react-redux';
import { getBlogInfo } from '../../store/blogInfo.redux';

@connect(
    state => ({
        blogInfoData: state.blogInfo.blogInfoData
    }),
    {
        getBlogInfo,
        setList(list) {
            return { type: 'GET_INFO', list }
        }
    }
)

class index extends React.Component {
    constructor(props) {
        super(props);

        this.state = {};

    }

    render() {
        const { blogNm, updateTime, blogAuthor } = this.props.blogInfoData
        return (
            <>
                <div className="info-banner-container">
                    <div className="info-banner-container-img" style={{ background: `url(${require("../../assets/img/banner/infoBanner.jpg")})  center center / cover no-repeat rgb(34, 34, 34)` }}>
                        <div style={{ position: 'relative', top: '60px' }}>
                            <div className="info-banner-container-title">
                                {blogNm}
                            </div>
                            <div className="info-banner-container-date">
                                Posted by {blogAuthor} on {updateTime}
                            </div>

                        </div>
                    </div>
                </div>
            </>
        );
    }
}



export default index;